<?php 
/**
*	IMMOPHP
*   @author Drouche Romain
*   http://www.immophp.fr
**/
require 'kernel/common.php';

$Annonce_adm = new Annonce_adm($paramClass);

// Gestion des actions
if(isset($_POST['ajout'])) $Annonce_adm->setAjout();
if(isset($_POST['edition']))$Annonce_adm->setEdition();
if(isset($_GET['delete'])) $Annonce_adm->setDelete(retrieve('GET', 'annonce_id'));
if(isset($_GET['unactive']) && isset($_GET['annonce_id'])) $Annonce_adm->setUnactive(retrieve('GET', 'annonce_id'));

$Annonce_adm->liste_index();

$smarty->assign('lang', $lang);
$smarty->assign('token', $_SESSION['token']);

$smarty->display('annonce.tpl');

require 'footer.php';
?>